import Layout from '@/layout/index'
import { getNetModel } from '@/util/storage'

export default [
  {
    path: '/doc/system',
    hidden: true,
    component: Layout,
    children: [
      {
        path: '/doc/system',
        name: 'DocSystem',
        component: () => import('@/pages/doc/system/index'),
        meta: { title: 'system doc' }
      }]
  }, {
    path: '/doc/details/:id',
    hidden: true,
    component: Layout,
    children: [
      {
        path: '/doc/details/:id',
        name: 'DocDetails',
        component: () => import('@/pages/doc/details/index'),
        meta: { title: 'doc details' }
      }]
  },
  {
    path: '/doc/product',
    hidden: true,
    component: Layout,
    children: [
      {
        path: '/doc/product',
        name: 'DocProduct',
        component: () => import('@/pages/doc/product/index'),
        meta: { title: 'product doc' }
      }]
  },
  {
    path: '/doc/custom',
    hidden: true,
    component: Layout,
    children: [
      {
        path: '/doc/custom',
        name: 'DocCustom',
        component: () => import('@/pages/doc/custom/index'),
        meta: { title: 'custom doc' }
      }]
  },
  {
    path: '/tag/list',
    hidden: true,
    component: Layout,
    children: [
      {
        path: '/tag/list',
        name: 'TagModel',
        component: () => import('@/pages/tag/list/index'),
        meta: { title: 'tag model' }
      }]
  },
  {
    path: '/tag/manage',
    hidden: true,
    component: Layout,
    children: [
      {
        path: '/tag/manage',
        name: 'TagManage',
        component: () => import('@/pages/tag/manage/index'),
        meta: { title: 'tag manage' }
      }]
  },
  {
    path: '/device/info/:deviceCore',
    hidden: true,
    component: Layout,
    children: [{
      path: '/device/info/:deviceCore',
      name: 'DeviceInfo',
      component: () => import('@/pages/device/info/index'),
      meta: { title: 'device info' }
    }]
  },
  {
    path: '/device/sensor-real-time/:deviceCore',
    hidden: true,
    component: Layout,
    children: [{
      path: '/device/sensor-real-time/:deviceCore',
      name: 'SensorRealTime',
      component: () => import('@/pages/device/sensor-real-time/index'),
      meta: { title: 'realTime' }
    }]
  },
  {
    path: '/device/linkage/:deviceCore',
    hidden: true,
    component: Layout,
    children: [{
      path: '/device/linkage/:deviceCore',
      name: 'Linkage',
      component: () => import('@/pages/device/linkage/index'),
      meta: { title: 'linkage', icon: 'el-icon-connection' }
    }]

  },
  {
    path: '/device/linkage/execute/:deviceCore',
    hidden: true,
    component: Layout,
    children: [{
      path: '/device/linkage/execute/:deviceCore',
      name: 'LinkageExecute',
      component: () => import('@/pages/device/linkage/execute/index'),
      meta: { title: 'linkage execute', icon: 'el-icon-document-remove' }
    }]
  },
  {
    path: '/device/manage/:deviceCore',
    hidden: true,
    component: Layout,
    children: [
      {
        path: '/device/manage/:deviceCore',
        name: 'DeviceManage',
        component: () => import('@/pages/device/manage/index'),
        meta: { title: 'device manage', icon: 'el-icon-menu' }
      }]

  },
  {
    path: '/device/local/:deviceCore',
    hidden: true,
    component: Layout,
    children: [{
      path: '/device/local/:deviceCore',
      name: 'DeviceLocal',
      component: () => import('@/pages/device/local/index'),
      meta: { title: 'device local', icon: 'el-icon-position' }
    }]

  },

  {
    path: '/device/sensor/history/:sensorId',
    hidden: true,
    component: Layout,
    children: [{
      path: '/device/sensor/history/:sensorId',
      name: 'SensorHistory',
      component: () => import('@/pages/device/sensor/history/index'),
      meta: { title: 'sensor history', icon: 'el-icon-date' }
    }]

  },
  {
    path: '/device/sensor/analysis/:sensorId',
    hidden: true,
    component: Layout,
    children: [{
      path: '/device/sensor/analysis/:sensorId',
      name: 'SensorAnalysis',
      component: () => import('@/pages/device/sensor/analysis/index'),
      meta: { title: 'sensor analysis', icon: 'el-icon-camera-line' }
    }]
  },
  {

    path: '/device/explain/:deviceCore',
    hidden: true,
    component: Layout,
    children: [{
      path: '/device/explain/:deviceCore',
      name: 'Explain',
      component: () => import('@/pages/device/explain/index'),
      meta: { title: 'explain', icon: 'el-icon-document' }
    }]
  },
  {

    path: '/device/sensor/:deviceCore',
    hidden: true,
    component: Layout,
    children: [{
      path: '/device/sensor/:deviceCore',
      name: 'SensorManage',
      component: () => import('@/pages/device/sensor/index'),
      meta: { title: 'sensor manage', icon: 'el-icon-cpu' }
    }]

  },
  {
    path: '/device/sensor/real-time/:sensorId',
    hidden: true,
    component: Layout,
    children: [{
      path: '/device/sensor/real-time/:sensorId',
      name: 'SensorRealTime',
      component: () => import('@/pages/device/sensor/real-time/index'),
      meta: { title: 'realTime', icon: 'el-icon-odometer' }
    }]
  },
  {
    path: '/device/sensor/real-time2/:sensorId',
    hidden: true,
    component: () => import('@/pages/device/sensor/real-time/index'),
    meta: { title: 'realTime', icon: 'el-icon-odometer' }
  },
  {
    path: '/device/sensor-history/:deviceCore',
    hidden: true,
    component: Layout,
    children: [{
      path: '/device/sensor-history/:deviceCore',
      name: 'SensorHistory',
      component: () => import('@/pages/device/sensor-history/index'),
      meta: { title: 'history', icon: 'el-icon-date' }
    }]
  },
  {
    path: '/device/param/:deviceCore',
    hidden: true,
    component: Layout,
    children: [{
      path: '/device/param/:deviceCore',
      name: 'DeviceParam',
      component: () => import('@/pages/device/param/index'),
      meta: { title: 'param', icon: 'el-icon-menu' }
    }]
  },
  {
    path: '/device/setting/:deviceCore',
    hidden: true,
    component: Layout,
    children: [{
      path: '/device/setting/:deviceCore',
      name: 'SettingManage',
      component: () => import('@/pages/device/setting/index'),
      meta: { title: 'setting manage', icon: 'el-icon-setting' }
    }]
  },
  // {
  //   path: '/now2',
  //   name: 'IotNow',
  //   hidden: true,
  //   component: () => import('@/pages/iot/now/index'),
  //   meta: { title: 'iot realTime' }
  // }

  {
    path: '/device/status/:deviceCore',
    component: Layout,
    children: [
      {
        path: '/device/status/:deviceCore',
        name: 'DeviceStatus',
        component: () => import('@/pages/device/status/index'),
        meta: { title: 'device status', icon: 'el-icon-connection' }
      }]
  },
  {
    path: '/device/warn/:deviceCore',
    component: Layout,
    children: [
      {
        path: '/device/warn/:deviceCore',
        name: 'DeviceWarn',
        component: () => import('@/pages/device/warn/index'),
        meta: { title: 'device warn', icon: 'el-icon-warning-outline' }
      }
    ]
  },
  {
    path: '/device/setting/history/:deviceCore',
    component: Layout,
    children: [{
      path: '/device/setting/history/:deviceCore',
      name: 'SettingHistory',
      component: () => import('@/pages/device/setting/history/index'),
      meta: { title: 'setting history', icon: 'el-icon-thumb' }
    }]
  },
  {
    path: '/device/setting/visible/:deviceCore',
    hidden: true,
    component: Layout,
    children: [{
      path: '/device/setting/visible/:deviceCore',
      name: 'SettingVisible',
      component: () => import('@/pages/device/setting/visible/index'),
      meta: { title: 'setting visible', icon: 'el-icon-date' }
    }]
  },
  {
    path: '/device/belong/group/manage',
    hidden: true,
    component: Layout,
    children: [
      {
        path: '/device/belong/group/manage',
        name: 'GroupManage',
        component: () => import('@/pages/device/belong/group/manage/index'),
        meta: { title: 'group manage' }
      }
    ]
  },
  {
    path: '/device/belong/list/:deviceCore',
    component: Layout,
    meta: { group: 'user device' },
    children: [
      {
        path: '/device/belong/list/:deviceCore',
        name: 'ListModel',
        component: () => import('@/pages/device/belong/list/index'),
        meta: { title: 'list model', icon: 'el-icon-cpu' }
      }]
  },
  {
    path: '/device/belong/batch',
    component: Layout,
    children: [
      {
        path: '/device/belong/batch',
        name: 'BatchModel',
        component: () => import('@/pages/device/belong/batch/index'),
        meta: { title: 'batch model', icon: 'el-icon-finished' }
      }
    ]
  },
  {
    path: '/device/belong/grid',
    component: Layout,
    children: [
      {
        path: '/device/belong/grid',
        name: 'GridModel',
        component: () => import('@/pages/device/belong/grid/index'),
        meta: { title: 'grid model', icon: 'el-icon-s-grid' }
      }
    ]
  },
  {
    path: '/device/belong/map',
    component: Layout,
    children: [
      {
        path: '/device/belong/map',
        name: 'MapModel',
        component: () => import('@/pages/device/belong/map/index'),
        meta: { title: 'map model', icon: 'el-icon-map-location' }
      }]
  },
  {
    path: '/device/belong/group',
    component: Layout,
    children: [
      {
        path: '/device/belong/group',
        name: 'GroupModel',
        component: () => import('@/pages/device/belong/group/index'),
        meta: { title: 'group model', icon: 'el-icon-takeaway-box' }

      }]
  },
  {
    path: '/device/belong/area',
    component: Layout,
    hidden: getNetModel() === 'local',
    children: [
      {
        path: '/device/belong/area',
        name: 'AreaModel',
        component: () => import('@/pages/device/belong/area/index'),
        meta: { title: 'area model', icon: 'el-icon-location-information' }

      }]
  },
  {
    path: '/topo/editor/:deviceCore',
    hidden: true,
    component: Layout,
    children: [
      {
        path: '/topo/editor/:deviceCore',
        name: 'TopoEditor',
        component: () => import('@/topo/pages/Editor.vue'),
        meta: { title: 'topo editor' }
      }]
  },
  {
    path: '/topo/fullscreen',
    hidden: true,
    component: Layout,
    children: [
      {
        path: '/topo/fullscreen',
        name: 'TopoFullscreen',
        component: () => import('@/topo/pages/Fullscreen.vue'),
        meta: { title: 'topo fullscreen' }
      }]
  },
  {
    path: '/topo/component/manage',
    hidden: true,
    component: Layout,
    children: [{
      path: '/topo/component/manage',
      name: 'TopoComponent',
      component: () => import('@/topo/pages/ComponentManage.vue'),
      meta: { title: 'topo component' }
    }]
  },
  {
    path: '/mobile/web',
    meta: { group: 'other' },
    hidden: getNetModel() === 'local',
    component: Layout,
    children: [
      {
        path: '/mobile/web',
        name: 'Mobile',
        component: () => import('@/pages/mobile/web/index'),
        meta: { title: 'mobile', icon: 'el-icon-mobile-phone' }
      }
    ]
  }
]
